<?php echo $javascript->link('jquery.min.js', false); ?>
<?php echo $javascript->link('jquery-ui-1.7.2.custom.min.js', false); ?>

<?php
 echo $javascript->codeBlock('
    $(function() {
		$(".Categories").tabs({ fx: { opacity: "toggle" } });
	});
', array('inline' => false)); 
?>

<div class ="hotfiles">
    <div class="RecommendedFiles">
        <div class="RecommendedFiles_title">
        <?php echo $html->link('推荐下载', ''); ?>
        </div>
        <div class="RecommendedFiles_content">
            <ul>
                <?php if (!empty($RecommendedFiles)) { 
                        foreach ($RecommendedFiles as $name => $entry) {
                ?>
                <li>
                    <div class="files_logo">
                        <a href="<?php echo $html->url("/ftpfiles/detail/{$entry->b64filename}"); ?>" title="<?php echo $entry->Name; ?>">
                            <img src="<?php echo $html->url('/ftpfiles/icon/'.$entry->b64filename); ?>" />
                        </a>
                    </div>
                    <div class="files_title"><?php echo $html->link($entry->Name, "/ftpfiles/detail/{$entry->b64filename}"); ?></div>
                </li>
                <?php }} ?>
            </ul>
        </div>
    </div>
    
    <div class="Categories_title">
        <?php echo $html->link('热门分类', ''); ?>
    </div>
    <div class="Categories">
        <ul>
        <?php foreach($Categories as $name => $entry) { ?>
		    <li><a href="<?php echo '#'.$name; ?>"><?php echo $entry->Name; ?></a></li>
		<?php } ?>
	</ul>
	<?php foreach($CategoriesFiles as $name => $entry) { ?>
	    <div id="<?php echo $name; ?>">
		    <table class = "chart_files">
		        <tbody>
		            <?php $i =0 ;foreach($entry as $filename => $fileinfo) { ?>
		            <tr onmouseover = "this.style.background = '#c3e1dd';" onmouseout = "this.style.background = '#ffffff';" class = "table_tr">
		                <td class = "ranking"><?php echo ++$i; ?></td>
		                <td class = "item_title"><?php echo $html->link($fileinfo->Name, "/ftpfiles/detail/{$fileinfo->b64filename}"); ?></td>
		                <td class = "item_description"><?php echo $html->link($fileinfo->Description, "/ftpfiles/detail/{$fileinfo->b64filename}"); ?></td>
		            </tr>
		            <?php } ?>
		        </tbody>
		    </table>
	    </div>
	<?php } ?>
		
	</div>

        
    </div>
    
</div>
